package twi.filter;

import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.vocabulary.RDF;

public class TypeNodeFilter implements NodeFilter{

	private boolean ignore;

	public TypeNodeFilter(boolean f){
		this.ignore = f;
	}
	@Override
	public boolean isValid(RDFNode node) {
		if (ignore)
			if (node.asNode().equals(RDF.type.asNode()))
				return false;
			else
				return true;
		if (node.asNode().equals(RDF.type.asNode()))
			return true;
		else
			return false;
	}

	@Override
	public void decodeString(String filterString) {
		// TODO Auto-generated method stub

	}

	@Override
	public String encodeString() {
		// TODO Auto-generated method stub
		return null;
	}

}
